export default {
  run() {
    clearTimeout(this.tid);
    this.tid = setTimeout(this.refresh, 50);
  },
  refresh() {
    let width = window.innerWidth;
    if (width < 1200) {
      width = 1200;
    }
    const remFs = width / 50;
    const docEl = window.document.documentElement;
    docEl.style.fontSize = `${remFs}px`;
  },
};
